package pojo;


import anna.ExcelConfig;
import anna.ExcelField;

import java.util.Optional;

@ExcelConfig
public class ServiceDesc {

    @ExcelField(index = 0, value = "编号")
    private String serviceCode;
    @ExcelField(index = 1, value = "描述")
    private String serviceDesc;
    @ExcelField(index = 2, value = "地址")
    private String firstUrl;
    @ExcelField(index = 3, value = "用例个数")
    private Integer total;
    @ExcelField(index = 4, value = "成功次数")
    private Integer success;
    @ExcelField(index = 5, value = "失败次数")
    private Integer fail;
    @ExcelField(index = 6, value = "异常次数")
    private Integer error;
    @ExcelField(index = 7, value = "平均耗时")
    private Long avg;
    @ExcelField(index = 8, value = "最大耗时")
    private Long max;
    @ExcelField(index = 9, value = "最小耗时")
    private Long min;

    public String getServiceCode() {
        serviceCode = Optional.ofNullable(serviceCode).orElse("");
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public String getServiceDesc() {
        serviceDesc = Optional.ofNullable(serviceDesc).orElse("");
        return serviceDesc;
    }

    public void setServiceDesc(String serviceDesc) {
        this.serviceDesc = serviceDesc;
    }

    public String getFirstUrl() {
        firstUrl = Optional.ofNullable(firstUrl).orElse("");
        return firstUrl;
    }

    public void setFirstUrl(String firstUrl) {
        this.firstUrl = firstUrl;
    }

    public Integer getTotal() {
        total = Optional.ofNullable(total).orElse(0);
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getSuccess() {
        success = Optional.ofNullable(success).orElse(0);
        return success;
    }

    public void setSuccess(Integer success) {
        this.success = success;
    }

    public Integer getFail() {
        fail = Optional.ofNullable(fail).orElse(0);
        return fail;
    }

    public void setFail(Integer fail) {
        this.fail = fail;
    }

    public Long getAvg() {
        avg = Optional.ofNullable(avg).orElse(0L);
        return avg;
    }

    public void setAvg(Long avg) {
        this.avg = avg;
    }

    public Long getMax() {
        max = Optional.ofNullable(max).orElse(0L);
        return max;
    }

    public void setMax(Long max) {
        this.max = max;
    }

    public Long getMin() {
        min = Optional.ofNullable(min).orElse(0L);
        return min;
    }

    public void setMin(Long min) {
        this.min = min;
    }

    public Integer getError() {
        return error;
    }

    public void setError(Integer error) {
        this.error = error;
    }
}
